OPC Studio User's Guide and Reference
OPC UA Attribute Data
Client and Subscriber Development > Development Fundamentals > Components and Objects > Helper Types > Data Objects > OPC UA Attribute Data

The combination of data value, source and serve timestamps and status code is common in OPC-UA. This combination is returned e.g. when an attribute of an OPC node is read. Note that according to OPC specification, the actual data value is only valid with certain status codes (typically, when the status is Good).

QuickOPC-UA has a UAAttributeData object for this combination. The object provides access to individual elements of this combination, and also allows common operations such as comparisons. It can also be easily converted to a string containing textual representation of all its elements.

If you only want a textual representation for a data value from the attribute data, use the DisplayValue method. This is recommended over trying to extract the Value property and converting it to string, as you will automatically receive an empty string if the value is not valid according to OPC rules (e.g. Bad status), and a null reference case is handled as well.

See Also

Examples - OPC Unified Architecture

Reference